package com.aluka.nirvana.framework.security.configuration;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 自定义配置
 * @author gongli
 * @since 2020/4/13
 */
@ConfigurationProperties(prefix = "nirvana.security")
@Data
public class SecurityCustomsConfiguration {

    /**
     * 开放的资源列表
     */
    private String openResources = "/doc.html";
    /**
     * Token有效期 单位:小时 默认[24小时]
     */
    private Integer tokenExpire = 24;
    /**
     * 登录接口地址[post]
     */
    private String loginUrl = "/login";
    /**
     * 注销接口地址[post]
     */
    private String logoutUrl = "/logout";
    /**
     * 校验接口是否允许访问 默认 false
     */
    private boolean authenticationValidEnabled = false;
    /**
     * 登录成功后，允许在BaseUserDetails中额外绑定的用户属性
     */
    private String loginSuccessCustomFields = "userId";

}
